/**
 * Package:com.afteryuan.server.data;
 * $Id$
 * Copyright(c) 2001-2005 www.afteryuan.com
 */
package com.afteryuan.server.data;

import com.afteryuan.server.command.model.Avatar;

/**
 * SpriteUtil
 * <p/>
 * <p><a href="SpriteUtil.java.html"><i>View Source</i></a></p>
 *
 * @author <a href="mailto:afteryuan@afteryuan.com">$Author$</a>
 * @version $Revision$
 */
public class SpriteUtil{
    public static Avatar buildAvatar(Sprite sprite){
        Avatar a = new Avatar();
        a.avatarId=sprite.getId();
        a.hp=sprite.getHp();
        a.speed = sprite.getSpeed();
        a.startX = sprite.getCx();
        a.startY = sprite.getCy();
        a.listPane = sprite.getPanes();
        return a;
    }
    
    public static Avatar buildEnterAvatar(Sprite sprite){
    	Avatar a = new Avatar();
        a.avatarId=sprite.getId();
        a.hp=sprite.getHp();
        a.speed = sprite.getSpeed();
        a.startX = sprite.getDx();
        a.startY = sprite.getDy();
        a.listPane = sprite.getPanes();
        return a;
    }
}
